package com.nexxoft.struts.connection;

import org.hibernate.Session;
import org.hibernate.SessionFactory;
import org.hibernate.cfg.Configuration;



public class Connec {
	private static Configuration conf=null;
	private static SessionFactory factory=null;
	private static Session session=null;
	public static Session getSession()
	{
		if(factory==null)
		{
		conf=new Configuration();
		conf.configure();
		factory=conf.buildSessionFactory();
		}
		
		session=factory.openSession();
		return session;
	}

}
